From 25329d009b238d8c1a6f815ba00fbd1e01a91e70 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Fri, 18 Mar 2005 09:15:33 +0000 Subject: [PATCH] bitkeeper revision 1.1236.1.81 (423a9c35x9t_HfUlWPlWGs0UrB7kUg) Fix bind-IPI hypercall arg check. Signed-off-by: Anthony Liguori Signed-off-by: Keir Fraser --- xen/common/event_channel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index 69857e644c..b1ed16ac37 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -283,6 +283,9 @@ static long evtchn_bind_ipi(evtchn_bind_ipi_t *bind) struct domain *d = ed->domain; int port, ipi_edom = bind->ipi_edom; + if ( ipi_edom >= MAX_VIRT_CPUS ) + return -EINVAL; + spin_lock(&d->event_channel_lock); if ( (port = get_free_port(ed)) >= 0 ) -- 2.30.2